package com.example.mini_notepad.adapter;

import com.example.mini_notepad.activity.RecordNoteFragment;
import com.example.mini_notepad.activity.SavedNoteFragment;
import com.example.mini_notepad.activity.TextNoteFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class SectionsPagerAdapter extends FragmentPagerAdapter {
	
	private static final int TAB_COUNT = 3;

	public SectionsPagerAdapter(FragmentManager fm) {
		super(fm);
		// TODO Auto-generated constructor stub
	}

	@Override
	public Fragment getItem(int index) {
		// TODO Auto-generated method stub
		switch(index){
			case 0:
				return new TextNoteFragment();
			case 1:
				return new RecordNoteFragment();
			case 2:
				return new SavedNoteFragment();
			default:
				return new TextNoteFragment();
		}
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return TAB_COUNT;
	}

}
